package com.goodluck.goodluckim.db.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Unique;

/**
 * 会话数据
 * Created by wyj on 2018/9/7.
 */
@Entity
public class RecentSession {

    @Id
    private Long id;
    /**
     * 消息id
     */
    @Unique
    private long messageId;
    /**
     * 是发送者还是接收者
     */
    private int messageDirection;
    /**
     * 发送者ID
     */
    private long senderUserId;
    /**
     * 接收时间
     */
    private long receivedTime;
    /**
     * 接收状态  isRead isDownload isRetrieved isMultipleReceive
     */
    private int receivedStatus;
    /**
     * 发送时间
     */
    private long sendTime;
    /**
     * 发送状态     SENDING,FAILED, SENT, RECEIVED,READ, DESTROYED,CANCELED
     */
    private int sendStatus;
    /**
     * 名称
     */
    private String objectName;
    /**
     * 消息体
     */
    private String messageContent;
    /**
     * 未读数
     */
    private int readReceiptInfo;
    /**
     * 置顶 （插入时间，按时间排序）
     */
    private long stickTime;
    /**
     * 接收者ID
     */
    private long receiveId;
    /**
     * 会话类型
     */
    private int sessionType;
    /**
     * 消息类型
     */
    private int messageType;
    /**
     * 消息来源（个聊是发送者ID、群聊是群ID、其他消息如消息通告可在后台配置固定ID）
     */
    @Unique
    private long sessionID;
    /**
     * 附件信息JSON串(语言、视频、定位等信息)
     */
    private String msgAttachment;
    /**
     * 附件状态	def（默认状态，未开始），fail（传输失败），transferred（传输成功），transferring（正在传输）
     */
    private int attachStatus;
    /**
     * 附加
     */
    private String extra;
    @Generated(hash = 1200645934)
    public RecentSession(Long id, long messageId, int messageDirection,
            long senderUserId, long receivedTime, int receivedStatus, long sendTime,
            int sendStatus, String objectName, String messageContent,
            int readReceiptInfo, long stickTime, long receiveId, int sessionType,
            int messageType, long sessionID, String msgAttachment, int attachStatus,
            String extra) {
        this.id = id;
        this.messageId = messageId;
        this.messageDirection = messageDirection;
        this.senderUserId = senderUserId;
        this.receivedTime = receivedTime;
        this.receivedStatus = receivedStatus;
        this.sendTime = sendTime;
        this.sendStatus = sendStatus;
        this.objectName = objectName;
        this.messageContent = messageContent;
        this.readReceiptInfo = readReceiptInfo;
        this.stickTime = stickTime;
        this.receiveId = receiveId;
        this.sessionType = sessionType;
        this.messageType = messageType;
        this.sessionID = sessionID;
        this.msgAttachment = msgAttachment;
        this.attachStatus = attachStatus;
        this.extra = extra;
    }
    @Generated(hash = 377644957)
    public RecentSession() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public long getMessageId() {
        return this.messageId;
    }
    public void setMessageId(long messageId) {
        this.messageId = messageId;
    }
    public int getMessageDirection() {
        return this.messageDirection;
    }
    public void setMessageDirection(int messageDirection) {
        this.messageDirection = messageDirection;
    }
    public long getSenderUserId() {
        return this.senderUserId;
    }
    public void setSenderUserId(long senderUserId) {
        this.senderUserId = senderUserId;
    }
    public long getReceivedTime() {
        return this.receivedTime;
    }
    public void setReceivedTime(long receivedTime) {
        this.receivedTime = receivedTime;
    }
    public int getReceivedStatus() {
        return this.receivedStatus;
    }
    public void setReceivedStatus(int receivedStatus) {
        this.receivedStatus = receivedStatus;
    }
    public long getSendTime() {
        return this.sendTime;
    }
    public void setSendTime(long sendTime) {
        this.sendTime = sendTime;
    }
    public int getSendStatus() {
        return this.sendStatus;
    }
    public void setSendStatus(int sendStatus) {
        this.sendStatus = sendStatus;
    }
    public String getObjectName() {
        return this.objectName;
    }
    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }
    public String getMessageContent() {
        return this.messageContent;
    }
    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }
    public int getReadReceiptInfo() {
        return this.readReceiptInfo;
    }
    public void setReadReceiptInfo(int readReceiptInfo) {
        this.readReceiptInfo = readReceiptInfo;
    }
    public long getStickTime() {
        return this.stickTime;
    }
    public void setStickTime(long stickTime) {
        this.stickTime = stickTime;
    }
    public long getReceiveId() {
        return this.receiveId;
    }
    public void setReceiveId(long receiveId) {
        this.receiveId = receiveId;
    }
    public int getSessionType() {
        return this.sessionType;
    }
    public void setSessionType(int sessionType) {
        this.sessionType = sessionType;
    }
    public int getMessageType() {
        return this.messageType;
    }
    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }
    public long getSessionID() {
        return this.sessionID;
    }
    public void setSessionID(long sessionID) {
        this.sessionID = sessionID;
    }
    public String getMsgAttachment() {
        return this.msgAttachment;
    }
    public void setMsgAttachment(String msgAttachment) {
        this.msgAttachment = msgAttachment;
    }
    public int getAttachStatus() {
        return this.attachStatus;
    }
    public void setAttachStatus(int attachStatus) {
        this.attachStatus = attachStatus;
    }
    public String getExtra() {
        return this.extra;
    }
    public void setExtra(String extra) {
        this.extra = extra;
    }
}
